package com.zzyl.config;import com.zzyl.intercept.TokenInterceptor;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.InterceptorRegistry;import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;@Configurationpublic class TokenConfigure implements WebMvcConfigurer {    @Autowired    private TokenInterceptor tokenInterceptor;    /**     * 注册拦截器     */    @Override    public void addInterceptors(InterceptorRegistry registry) {        // 放开登录和接口文档的路径        registry.addInterceptor(tokenInterceptor).addPathPatterns("/**").excludePathPatterns("/security/login", "/common/upload", "/doc.html", "/webjars/**", "/swagger-resources", "/v2/api-docs");    }}